// vite.config.ts
import { defineConfig } from "file:///Users/lz/Desktop/@wr/test-build/vite-project/node_modules/.pnpm/vite@5.4.3/node_modules/vite/dist/node/index.js";
import { vitePlugin } from "file:///Users/lz/Desktop/@wr/ww/packages/vite/dist/index.js";
import { visualizer } from "file:///Users/lz/Desktop/@wr/test-build/vite-project/node_modules/.pnpm/rollup-plugin-visualizer@5.12.0_rollup@4.21.2/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";
import cndImport from "file:///Users/lz/Desktop/@wr/test-build/vite-project/node_modules/.pnpm/vite-plugin-cdn-import@1.0.1_rollup@4.21.2_vite@5.4.3/node_modules/vite-plugin-cdn-import/dist/index.js";

// src/routes.ts
var routes_default = [
  {
    path: "/a",
    element: "@/a1.tsx",
    access: "wew"
  },
  {
    path: "/app",
    element: "@/app.tsx",
    access: "222"
  },
  {
    path: "/h1",
    element: "@/h1.tsx",
    access: "222"
  },
  {
    path: "/h2",
    element: "@/h2.tsx",
    access: "222"
  }
];

// vite.config.ts
var vite_config_default = defineConfig({
  plugins: [vitePlugin({
    routes: routes_default
  }), {
    name: "test-ui",
    renderChunk(code, id) {
      if (id.includes("/vite-project/src/helper.ts")) {
        console.log(id, code);
      }
    }
  }, visualizer(), cndImport({
    modules: [{
      name: "react",
      var: "React",
      path: "https://unpkg.com/react@18.3.1/umd/react.production.min.js"
    }, {
      name: "react-dom",
      var: "ReactDOM",
      path: "https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js"
    }]
  })],
  resolve: {
    alias: {
      "@": "/src/",
      qps: "/src/.qps/exports.ts"
    }
  },
  build: {
    assetsDir: "",
    minify: false,
    rollupOptions: {
      external: ["react", "react-dom"],
      output: {
        entryFileNames: `index.js`,
        esModule: false,
        // manualChunks: (id: string, meta) => {
        //   // if (id.includes(normalizePath(path.join(__dirname, './src/h1')))) {
        //   // //  console.log(id)
        //   //   // return 'h1'
        //   //       //  console.log(id,meta.getModuleIds(),meta.getModuleInfo(id)?.importedIds)
        //   // }
        //   // if (id.includes('/Users/lz/Desktop/@wr/test-build/vite-project/src/utils/helper.ts')) {
        //   //   // console.log(meta.getModuleInfo(id)?.importers,meta.getModuleInfo(id))
        //   //   console.log(id,meta.getModuleInfo(id))
        //   //   return 'h1'
        //   // }
        //       //   if(id.includes('/node_modules/antd/es/button/index.js')){
        //       //     console.log(id)
        //       //     return 'antd-button'
        //       //   }
        //       //   if(id.includes('/node_modules/antd/es/form/index.js')){
        //       //     console.log(id)
        //       //     return 'antd-form'
        //       //   }
        //       //   if(id.includes('/node_modules/antd/es/input/index.js')){
        //       //     console.log(id)
        //       //     return 'antd-input'
        //       //   }
        // },
        assetFileNames(chunkInfo) {
          if (chunkInfo.name?.includes("css")) {
            return `index.css`;
          }
          return chunkInfo.name || "";
        }
      }
    },
    cssCodeSplit: false
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiLCAic3JjL3JvdXRlcy50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiY29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2Rpcm5hbWUgPSBcIi9Vc2Vycy9sei9EZXNrdG9wL0B3ci90ZXN0LWJ1aWxkL3ZpdGUtcHJvamVjdFwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiL1VzZXJzL2x6L0Rlc2t0b3AvQHdyL3Rlc3QtYnVpbGQvdml0ZS1wcm9qZWN0L3ZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9Vc2Vycy9sei9EZXNrdG9wL0B3ci90ZXN0LWJ1aWxkL3ZpdGUtcHJvamVjdC92aXRlLmNvbmZpZy50c1wiO2ltcG9ydCB7IGRlZmluZUNvbmZpZywgbm9ybWFsaXplUGF0aCB9IGZyb20g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GUtcHJvamVjdC9zcmMvdXRpbHMvaGVscGVyLnRzJykpIHtcbiAgICAgICAgLy8gICAvLyAgIC8vIGNvbnNvbGUubG9nKG1ldGEuZ2V0TW9kdWxlSW5mbyhpZCk/LmltcG9ydGVycyxtZXRhLmdldE1vZHVsZUluZm8oaWQpKVxuICAgICAgICAvLyAgIC8vICAgY29uc29sZS5sb2coaWQsbWV0YS5nZXRNb2R1bGVJbmZvKGlkKSlcbiAgICAgICAgLy8gICAvLyAgIHJldHVybiAnaDEnXG4gICAgICAgIC8vICAgLy8gfVxuXG4gICAgICAgIC8vICAgICAgIC8vICAgaWYoaWQuaW5jbHVkZXMoJy9ub2RlX21vZHVsZXMvYW50ZC9lcy9idXR0b24vaW5kZXguanMnKSl7XG4gICAgICAgIC8vICAgICAgIC8vICAgICBjb25zb2xlLmxvZyhpZClcbiAgICAgICAgLy8gICAgICAgLy8gICAgIHJldHVybiAnYW50ZC1idXR0b24nXG4gICAgICAgIC8vICAgICAgIC8vICAgfVxuICAgICAgICAgICAgICAgXG4gICAgICAgIC8vICAgICAgIC8vICAgaWYoaWQuaW5jbHVkZXMoJy9ub2RlX21vZHVsZXMvYW50ZC9lcy9mb3JtL2luZGV4LmpzJykpe1xuICAgICAgICAvLyAgICAgICAvLyAgICAgY29uc29sZS5sb2coaWQpXG4gICAgICAgIC8vICAgICAgIC8vICAgICByZXR1cm4gJ2FudGQtZm9ybSdcbiAgICAgICAgLy8gICAgICAgLy8gICB9XG4gICAgICAgICAgXG4gICAgICAgIC8vICAgICAgIC8vICAgaWYoaWQuaW5jbHVkZXMoJy9ub2RlX21vZHVsZXMvYW50ZC9lcy9pbnB1dC9pbmRleC5qcycpKXtcbiAgICAgICAgLy8gICAgICAgLy8gICAgIGNvbnNvbGUubG9nKGlkKVxuICAgICAgICAvLyAgICAgICAvLyAgICAgcmV0dXJuICdhbnRkLWlucHV0J1xuICAgICAgICAvLyAgICAgICAvLyAgIH1cbiAgICAgICAgLy8gfSxcblxuICAgICA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